<template>
  <ServicesCard />
  <div class="aaaa">
    <Comment class="CCC"></Comment>
    <Poster class="BBB"></Poster>
  </div>
</template>

<script setup>
// 导入后自动注册，可直接在模板中使用
import ServicesCard from "@/components/ServicesCard.vue";
import Comment from "@/components/Comment.vue";
import Poster from "@/components/Poster.vue";
</script>

<style scoped>
.aaaa {
  /* 开启Flex布局 */
  display: flex;
  /* 可选：控制子组件间距 */
  gap: 20px;
  /* 可选：控制子组件在主轴上的对齐方式（如居中） */
  justify-content: center;
  /* 可选：控制子组件在交叉轴上的对齐方式 */
  align-items: center;
  /* 可选：允许换行（当子组件总宽度超过父容器时） */
  flex-wrap: wrap;
}

.BBB {
  /* 设置子组件宽度为父容器的一半 */
  width: 800px;
  height: 1000px;

}
.CCC{
  /* 设置子组件宽度为父容器的一半 */
  width: 250px;
  height: 1000px;

}

.service-details-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 服务详情样式 */
.service-info {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

.loading {
  color: #666;
  padding: 50px;
  text-align: center;
}

.service-title {
  margin: 0 0 15px;
  color: #2c3e50;
  font-size: 24px;
}

.service-subtitle {
  margin: 0 0 20px;
  color: #666;
  font-size: 16px;
}

.service-scope {
  margin-top: 20px;
  color: #333;
}

.service-scope h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #444;
}

/* 评论区域样式 */
.comments-section {
  padding: 20px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background-color: #fafafa;
}

.comments-title {
  margin: 0 0 20px;
  color: #2c3e50;
  font-size: 20px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item {
  padding: 15px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comment-content {
  margin: 0 0 10px;
  line-height: 1.6;
  color: #333;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.comment-star {
  color: #666;
}

.star-icon {
  color: #ddd;
  margin-left: 2px;
}

.star-icon.filled {
  color: #ffcc00; /* 填充星星为黄色 */
}

.comment-time {
  color: #999;
}

.no-comments {
  text-align: center;
  padding: 30px;
  color: #999;
  background-color: white;
  border-radius: 6px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .service-details-container {
    padding: 10px;
  }

  .comment-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}
</style>